package com.tarena.redis.demo.dao;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class StockDao {
    //模拟访问数据库表格数据
    public Integer getStock(String id){
        return 1;
    }
    //模拟减少库存
    public void reduceStock(String id){
        log.info("到持久层操作减库存,减少商品id:{},的库存数量1");
    }
}
